Ext.define('Seq.grid.column.Lookup', {
    extend: 'Ext.grid.column.Column',
    xtype: 'xlookupcolumn',

    config: {
        store: undefined
    },
    valueField: 'name',

    width: 85,
    align: 'center',
    menuDisabled: true,

    renderer(value, metaData, record, rowIndex, colIndex, store, view) {
        let me = this, vm = me.getViewModel() || me.up('[viewModel!=null]').getViewModel(), column = metaData.column;
        var store = vm && vm.getStore(column.store) || vm && vm.get(column.store) || Ext.getApplication().getStore(column.store);
        let rec = !Ext.isEmpty(value) && store.getById(Ext.isObject(value) ? value.id : value);
        return rec ? rec.data[column.valueField] : '';
    }

});